package cn.jzq.kotoba.modules.designpattern.factory;

/**
 * @author jzq
 * @date 2018/12/27 15:58
 */
public class App {

    public static void main(String[] args) {
        Pizza pizza = orderPizza("cheese");
        System.out.println(pizza.getClass());
        System.out.println(pizza instanceof CheesePizza);
        System.out.println(pizza instanceof PepperoniPizza);

        PizzaStore2 pizzaStore2 = new NYPizzaStore();
        Pizza pizza1 = pizzaStore2.createPizza("cheese");
        System.out.println(pizza1);
    }

    public static Pizza orderPizza(String type) {
        return new PepperoniPizza();
    }
}
